package com.kitty.game.equip.service;

import com.kitty.common.utils.SpringUtils;
import com.kitty.game.map.service.MapService;
import com.kitty.game.npc.NpcDataPool;
import com.kitty.game.npc.model.NpcButton;
import com.kitty.game.role.model.Role;
import com.kitty.game.role.service.RoleService;
import com.kitty.game.zhenbao.ZhenbaoService;
import org.nutz.dao.Dao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import static com.kitty.game.npc.model.NpcButton.*;


@Service
public class TZLCService {
    Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    RoleService roleService;
    @Autowired
    MapService mapService;
    @Autowired
    EquipService equipService;
    @Autowired
    Dao dao;


    public String point(Role role) {
        String head = "投资积分可以在我这理财哦！！";
        String content = head +
                "["+hdds_licai.getKey()+"]" +
                "["+hdds_getGold.getKey()+"]" +
                "";
        String tail = "[离开/离开]";
        return content+tail;
    }

    public void init(){
        NpcDataPool.npcButtonHandlers.put(NpcButton.hdds_getGold.getKey(), (npcButtonParam -> SpringUtils.getBean(TZLCService.class).getGold(npcButtonParam.getRole(), npcButtonParam.getMsg())));
    }

    private void getGold(Role role, String msg) {
        SpringUtils.getBean(ZhenbaoService.class).getGold(role);
    }


}
